package com.im.nero.studentanswers;

import java.util.ArrayList;
import java.util.List;

import com.im.nero.dao.TakeQizedao;
import com.im.nero.stusent.takequizeentity.Paperdata;
import com.opensymphony.xwork2.ActionSupport;

public class StudentAnswer extends ActionSupport {
	
	private int paperId;
	private String papername;
	private String subjectname;
	
	List<Paperdata> paperdatalist = new ArrayList<Paperdata>();
	List<Paperdata> radiolist = new ArrayList<Paperdata>();
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		
		
		if (paperId == 1) {
			System.out.println("paper ID is 1");
			
			TakeQizedao tke = new TakeQizedao();
			paperdatalist = tke.list(paperId);
			
			
			
			
			
			
			for(Paperdata pep : paperdatalist){
				
				Paperdata bnpaper = new Paperdata();
				
				bnpaper.setAnswer1(pep.getAnswer1());
				bnpaper.setAnswer1(pep.getAnswer2());
				bnpaper.setAnswer1(pep.getAnswer3());
				bnpaper.setAnswer1(pep.getAnswer4());
				bnpaper.setAnswer1(pep.getAnswer5());
				
				radiolist.add(bnpaper);				
			}
			
			
			
			
			
		}
		
		
		
		return "TT";
	}
	
	 
	public List<Paperdata> getRadiolist() {
		return radiolist;
	}


	public void setRadiolist(List<Paperdata> radiolist) {
		this.radiolist = radiolist;
	}


	public List<Paperdata> getPaperdatalist() {
		return paperdatalist;
	}


	public void setPaperdatalist(List<Paperdata> paperdatalist) {
		this.paperdatalist = paperdatalist;
	}


	public void validate() {
		System.out.println("validation phase");
		
		
	}


	public int getPaperId() {
		return paperId;
	}


	public void setPaperId(int paperId) {
		this.paperId = paperId;
	}


	public String getPapername() {
		return papername;
	}


	public void setPapername(String papername) {
		this.papername = papername;
	}


	public String getSubjectname() {
		return subjectname;
	}


	public void setSubjectname(String subjectname) {
		this.subjectname = subjectname;
	}
	
	
	
}
